package WeekThree;

import java.util.Scanner;

public class StrJude {
    public static boolean zongti(String str1,String str2) {
        if (str1.length()!=str2.length()){
            return false;
        }
        int len=str1.length();
        for (int i = 0; i < len; i++) {
            if (str1.charAt(i)!=str2.charAt(len-i-1)){
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args) {
        System.out.println("请输入第一个字符串");
        Scanner scanner = new Scanner(System.in);
        String str1 = scanner.next();
        System.out.println("请输入第二个字符串");
        Scanner scanner1 = new Scanner(System.in);
        String str2 = scanner1.next();
        if (zongti(str1,str2)){
            System.out.println("是逆置字符串");
        }else {
            System.out.println("不是逆置字符串");
        }
    }
}
